]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
notificationDaemon: Consider hyphens for app ID to object path translations
authorKrzesimir Nowak <krzesimir@kinvolk.io>
Fri, 18 Nov 2016 14:52:46 +0000 (15:52 +0100)
committerMario Sanchez Prada <mario@endlessm.com>
Mon, 25 Sep 2017 14:57:07 +0000 (15:57 +0100)
Some application IDs contain hyphens, which are not allowed in D-Bus object
paths, so we need to update the translation by converting them to something
that's a valid object path. This is consistent with what GApplication does.

https://bugzilla.gnome.org/show_bug.cgi?id=787902

js/ui/notificationDaemon.js

index 27ed28149f8fcd7cc4b2590608db8846a979633a..ed8870fe1950af9fd47a494f5cd37ffab42500a7 100644 (file)
@@ -670,7 +670,7 @@ const FdoApplicationIface = '<node> \
 const FdoApplicationProxy = Gio.DBusProxy.makeProxyWrapper(FdoApplicationIface);
 
 function objectPathFromAppId(appId) {
-    return '/' + appId.replace(/\./g, '/');
+    return '/' + appId.replace(/\./g, '/').replace(/-/g, '_');
 }
 
 function getPlatformData() {